import java.io.Serializable;

/**
 * Stores a Shamir Secret (x, p(x))
 * @author jwallrab
 *
 */
public class Share implements Serializable{

	/**
	 * For the compiler
	 */
	private static final long serialVersionUID = 5098928003839161528L;
	
	int x; 	//The Argument to the Polynomial
	double px;	//The Polynomial Evaluated at X
	
	/**
	 * Default Constructor
	 * @param param
	 * @param eval
	 */
	public Share(int param, double eval){
		
		x = param;
		px = eval;
	}
	
	public int getX(){
		return x;
	}
	
	public double getFx(){
		return px;
	}
	
	public String toString(){
		return "(" + x + "," + px + ")";
	}
}
